package com.itheima.mapper;

import com.itheima.pojo.Clazz;
import com.itheima.pojo.ClazzQueryParam;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface ClazzMapper {
    List<Clazz> list(ClazzQueryParam clazzQueryParam);

    @Delete("delete from clazz where id = #{id}")
    void delete(Integer id);

    void save(Clazz clazz);

    void update(Clazz clazz);

    @Select("select * from clazz")
    List<Clazz> findAll();
    @Select("select * from clazz where id = #{id}")
    Clazz getById(Integer id);
}
